<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="/wondershare/js/jquery.js"></script>
<script src="/wondershare/js/task.js"></script> 
<script src="/wondershare/js/jquery.cvbox.min.js"></script> 
<link href="/wondershare/styles/main.css" rel="stylesheet" type="text/css" />
<link href="/wondershare/styles/general.css" rel="stylesheet" type="text/css" />
</head>
<style type="text/css">
catListTag {
	DISPLAY: none
}
.cvBoxShade {
	Z-INDEX: 2000; BACKGROUND: #ccc; LEFT: 0px; WIDTH: 100%; POSITION: absolute; TOP: 0px; HEIGHT: 0px
}
.cvBoxBorder {
	BORDER-RIGHT: #000000 0px solid; PADDING-RIGHT: 8px; BORDER-TOP: #000000 0px solid; PADDING-LEFT: 8px; FONT-SIZE: 12px; Z-INDEX: 2000; PADDING-BOTTOM: 8px; BORDER-LEFT: #000000 0px solid; WIDTH: 100%; PADDING-TOP: 8px; BORDER-BOTTOM: #000000 0px solid; POSITION: absolute; BACKGROUND-COLOR: #ccc
}
.cvBoxBorder A {
	COLOR: #486aaa; TEXT-DECORATION: none
}
.cvBoxBorder A:hover {
	COLOR: #c00; TEXT-DECORATION: none
}
.cvBoxTitleBar {
	WIDTH: 100%; LINE-HEIGHT: 27px; HEIGHT: 26px; BACKGROUND-COLOR: #eeeeee
}
.cvBoxTitleBarText {
	PADDING-LEFT: 10px; FONT-WEIGHT: bold; FLOAT: left; COLOR: #333
}
.cvBoxTitleBarClose {
	PADDING-RIGHT: 10px; FLOAT: right; COLOR: #3867af; FONT-FAMILY: Verdana
}

.cvBoxBody {
	WIDTH: 100%; BACKGROUND-COLOR: #ffffff
}

</style>
<body >
<h1>
    <span class="action-span1">
    <a href="/wondershare/task_site.php?action=index" style="text-decoration:underline">站点管理</a> 
    </span>
    <span id="search_id" class="action-span1"> - 站点信息<{$title}> </span>
    <div style="clear:both"></div>
</h1>
<div id="tabbody-div"  style=" width:1100px;">
    <form  name="theForm" method="post" action="/wondershare/task_site.php?action=editSubmit" onsubmit="return checkSubmit();">
        <table align="center" width="90%" id="general-table">
        <tbody>
            <tr>
                <td class="label">站点名称：</td>
                <td>
                    <input type="text" size="60" style="float:left;color:;" value="<{$site_row.sName|escape}>" name="Name" id="Name"> 
                    <span class="require-field">*</span>
                </td>
            </tr>
            <tr>
                <td class="label">站点域名：</td>
                <td>
                    <input type="text" size="60" style="float:left;color:;" value="<{$site_row.sDomainName|escape}>" name="DomainName" id="DomainName"> 
                    <span class="require-field">*</span>
                </td>
            </tr>
            <tr>
                <td class="label">站点路径：</td>
                <td>
                	<input type="text" size="60" style="float:left;color:;" value="<{$site_row.sDirPath|escape}>" name="DirPath" id="DirPath" /> 
                </td>
            </tr>
            <tr>
                <td class="label">选择服务器：</td>
                <td>
                	<a id="a_sSer_Id" href="javascript:void(0);" onclick="showCvbox('select_server', 'server_checkbox', '选择服务器');"  >选择服务器</a>
                    <input type="text" size="50"  disabled="disabled" value="<{$site_row.sSer_Id|escape}>" name="sSer_Id" id="sSer_Id"  /> 
                     <input type="hidden"  value="<{$site_row.sSer_Id|escape}>" name="hidden_sSer_Id" id="hidden_sSer_Id"  /> 
                </td>
            </tr>
            
            <tr>
                <td class="label">一级菜单ID：</td>
                <td>
                	<input type="text" size="60" style="float:left;color:;" value="<{$site_row.sMid|escape}>" name="Mid" id="Mid" /> 
                </td>
            </tr>
            <tr>
                <td class="label">是否CDN：</td>
                <td>
                    <select name="IsCdn" id="IsCdn" >
                        <option value="0" <{if $site_row.sIsCdn == 0 }> selected="selected"  <{/if}> >否</option>
                        <option value="1" <{if $site_row.sIsCdn == 1 }> selected="selected"  <{/if}> >是</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td class="label">CDN邮件地址：</td>
                <td>
					<input type="text" size="60" style="float:left;color:;" value="<{$site_row.sCdnEmail|escape}>" name="CdnEmail" id="CdnEmail" /> 
                </td>
            </tr>
            <tr>
                <td class="label">站点描述：</td>
                <td>
                    <textarea cols="60" rows="6" id="Description" name="Description"><{$site_row.sDescription|escape}></textarea>
                    <span class="require-field">最多255个字</span>
                </td>
            </tr>        
        
        </tbody>
        </table>
        <div  style="margin-left:380px; margin-top:20px;">
        
        <input type="hidden"  name="Id" id="Id" value="<{$site_row.sId}>">
        <input type="hidden" value="<{$form_act}>" name="act" id="act" />
        <input type="submit"   class="button" value="<{$form_value}> " name="sub_from" id='sub_from' />
        <input type="reset" class="button" value=" 重置 ">
        </div>
    </form>
</div>

<div id="server_checkbox" style="display: none; width: 650px;  padding: 10px;">

   <{$server_checkbox_str}><br />
   <input type="button"    value="确定" name="check_server_checkbox"  onclick="confirmSimpleSelect('server', 'sSer_Id', 'hidden_sSer_Id', 'server_checkbox');" 
   style="margin-top:20px; margin-left:200px;">
</div>
    
<script>
//验证提交的数据
function checkSubmit() {
	
	var Name = $('#Name').val().replace(/(^\s*)|(\s*$)/g, "");
	var DomainName = $('#DomainName').val().replace(/(^\s*)|(\s*$)/g, "");
	var CdnEmail = $('#CdnEmail').val().replace(/(^\s*)|(\s*$)/g, "");
	var myreg = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
	
	if (Name == '') {
		alert('站点名称不能为空！');
		$("#Name").focus();
		return false;
	}
	
	if (DomainName == '') {
		alert('站点域名不能为空！');
		$("#DomainName").focus();
		return false;
	}
	
	if ( !myreg.test(CdnEmail) && CdnEmail != '') {
		alert('提示\n\n请输入有效的E_mail！');
		$("#CdnEmail").focus();
		return false;
	}
	
	return true;
	
}
	
</script>
</body>
</html>